package file;

import java.io.File;
import java.io.IOException;

public class fileDemo1 {
    public static void main(String[] args) throws IOException {
        File file = new File("./demofile1.txt");
        file.createNewFile();
        boolean exist=file.exists();
        System.out.println(exist);

        String name=file.getName();
        String path=file.getPath();
        long length=file.length();
        System.out.println(name);
        System.out.println(path);
        System.out.println(length);

        boolean read=file.canRead();
        boolean write=file.canWrite();
        boolean hide=file.isHidden();

        System.out.println(read);
        System.out.println(write);
        System.out.println(hide);
    }
}
